

#include "J.h"
#include "chuck.h"

#include "io.h"
#include "japi.h"
#include "lex.h"
#include "table.h"
#include "tag.h"
#include "mem.h"
#include "call.h"
#include "vm.h"


int main()
{
	call_state *cs;
	Jcall *jc;


	jc = J_loadF("./t.j");

	cs = Mnewvector(call_state);
	cs->base = NULL;
	cs->top = NULL;
	cs->stack = NULL;

	cs->ci_start = Mnvector(10, call_info);
	cs->ci_end = cs->ci_start+10;
	cs->ci = cs->ci_start;
	cs->sCi = 10;


	cs->top = Mnewvector(Jtag);


	cs->top->value.obj = cast(Jobject*, jc);


	call_precall(cs, cs->top);

	vm(cs, 0);
	
}